<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../../lib/dojo/dijit/themes/tundra/tundra.css">
        <link rel="stylesheet" type="text/css" href="../../lib/dojo/dojo/resources/dojo.css">
        <script src="../../lib/dojo/dojo/dojo.js" data-dojo-config="isDebug: true,parseOnLoad: true"></script>
        <script type="text/javascript">
            dojo.require("dojox.charting.Chart2D");
            dojo.require("dojox.charting.plot2d.Pie");
            dojo.require("dojox.charting.action2d.Highlight");
            dojo.require("dojox.charting.action2d.MoveSlice");
            dojo.require("dojox.charting.action2d.Tooltip");
            dojo.require("dojox.charting.themes.MiamiNice");
            dojo.require("dojox.charting.widget.Legend");

            dojo.addOnLoad(function() {
                var dc = dojox.charting;
                var chartTwo = new dc.Chart2D("chartTwo");
                chartTwo.setTheme(dc.themes.MiamiNice).addPlot("default", {
                    type: "Pie",
                    font: "normal normal 11pt Tahoma",
                    fontColor: "black",
                    labelOffset: -30,
                    radius: 200
                }).addSeries("Series A", [{
                        y: 4,
                        text: "แดง",
                        stroke: "black",
                        tooltip: "แดง 50%",
                        color: "red"
                    },
                    {
                        y: 2,
                        text: "เขียว",
                        stroke: "black",
                        tooltip: "เขียว 25%",
                        color: "green"
                    },
                    {
                        y: 1,
                        text: "เหลือง",
                        stroke: "black",
                        tooltip: "เหลือง !",
                        color: "yellow"
                    },
                    {
                        y: 1,
                        text: "อื่นๆ",
                        stroke: "black",
                        tooltip: "Mighty <strong>strong</strong><br>With two lines!",
                        color: "blue"
                    }]);
                var anim_a = new dc.action2d.MoveSlice(chartTwo, "default");
                var anim_b = new dc.action2d.Highlight(chartTwo, "default");
                var anim_c = new dc.action2d.Tooltip(chartTwo, "default");
                chartTwo.render();
                var legendTwo = new dojox.charting.widget.Legend({
                    chart: chartTwo
                },
                "legendTwo");
            });
        </script>
    </head>
    <body class="tundra">
        ทดสอบการสร้างกราฟ
        <div id="chartTwo" style="width: 600px; height: 600px;">
        </div>
        <div id="legendTwo">
        </div>
    </body>
</html>
